The field of the invention relates to a method and device for measuring a value that characterizes a variation between a quantity and a reference quantity, where said variation is measured with respect to a parameter on which both the quantity and reference quantity depend. An example of this is the determination of a variation between a signal and a reference signal, both of which depend on time.
A well known measure of variation is the variance which is defined as the mean value of the square of the difference between a sample value and the mean value of the samples. The standard deviation is the square root of the variance.
Specifically in connection with the characterization of timing signals, a measure of the time variation as a function of integration time is known, which is referred to as TDEV (time deviation) and is e.g. defined in ETSI European Telecommunication Standard ETS 300462-1, April 1997 or ITU-T Recommendation G.810, Series G: Transmission Systems and Media, August 1996. A time deviation TDEV is defined as                               TDEV          ⁡                      (                          n              ⁢                              xe2x80x83                            ⁢                              τ                0                                      )                          =                                            1                              6                ⁢                                  n                  2                                                      ⁢                          ⟨                                                [                                                            ∑                                              i                        =                        1                                            n                                        ⁢                                          (                                                                        x                                                      i                            +                                                          2                              ⁢                              n                                                                                                      -                                                  2                          ⁢                                                      x                                                          i                              +                              n                                                                                                      +                                                  x                          i                                                                    )                                                        ]                                2                            ⟩                                                          (        1        )            
where the angle brackets denote an ensemble average, and xi, with i=1, 2, . . . N, are sample values of a time error function x(t) and these samples are taken at equidistant time intervals. The time dependent error function x(t) is defined as the difference between a clock generating time T(t) and a reference clock generating time Tref(t). Here, t is therefore to be understood as the absolute (abstract) time, whereas T is a signal generated by a clock that depends on t and itself also represents a time. The N sample values are sampled at equal intervals xcfx840, such that xi=x(ixc2x7xcfx840), i=1, 2, . . . N. xcfx840 is the sampling period and xcfx84=nxc2x7xcfx840 is the observation interval.
The ensemble average relates to the observation interval in the sense that an average is taken over possible triplets xi+2n, xi+n, xi.
The above mentioned documents contain an estimator formula for TDEV, which is:                               TDEV          ⁡                      (                          n              ⁢                              xe2x80x83                            ⁢                              τ                0                                      )                          =                                            1                              6                ⁢                                  n                  2                                                      ⁢                          1                              (                                  N                  -                                      3                    ⁢                    n                                    +                  1                                )                                      ⁢                                          ∑                                  j                  =                  1                                                  N                  -                                      3                    ⁢                    n                                    +                  1                                            ⁢                                                [                                                            ∑                                              i                        =                        j                                                                    n                        +                        j                        -                        1                                                              ⁢                                          (                                                                        x                                                      i                            +                                                          2                              ⁢                              n                                                                                                      -                                                  2                          ⁢                                                      x                                                          i                              +                              n                                                                                                      +                                                  x                          i                                                                    )                                                        ]                                2                                                                        (        2        )            
where n=1, 2, . . . the integer part of N/3.
The problem with the above estimator formula is that a calculation results in two nested FOR-loops for the summation under the square root, and in three nested FOR-loops when calculating the values TDEV for all values of n, which is often required. With large values of N, which is typically the case, this results in a large calculation burden which either leads to long calculation times or to an increased amount of hardware for coping with the calculation burden in a reasonable amount of time. As an example, in communication systems using the above described TDEV as a control parameter for synchronization control, this leads to more circuitry, which makes the systems more complicated and more expensive.
The above mentioned problem is not restricted to systems calculating the deviation for a clock signal with respect to a reference clock signal over time, but will occur in any system based on the above principle of calculating a value representative of a variation based on the double sum                                           ∑            j                    ⁢                                    [                                                ∑                                      i                    =                                                                  f                        1                                            ⁡                                              (                        j                        )                                                                                                                        f                      2                                        ⁡                                          (                      j                      )                                                                      ⁢                                  (                                                            x                                              i                        +                                                  2                          ⁢                          n                                                                                      -                                          2                      ⁢                                              x                                                  i                          +                          n                                                                                      +                                          x                      i                                                        )                                            ]                        2                          ,                            (        3        )            
where the lower and upper boundaries of the inner sum running over i are respective functions (f1 and f2) of the outer variable j.
The present invention has the object of providing a better method of measuring a value characteristic of the variation between a quantity and a reference quantity, said value being based on the above described double sum.
This object is solved by the methods and devices described in the independent claims appended to the present application. Advantageous embodiments are described in the dependent claims.
The present invention greatly simplifies the determination of a value representative of the variation between a quantity and a reference quantity by employing a recursive formula, such that the two nested FOR-loops mentioned above can be avoided.
More specifically, the present invention defines a first value w1 as a function of the difference values xj, which represent differences between the quantity and the reference quantity, and determines the value R, which corresponds to the above mentioned double sum, through                     R        =                              w            1            2                    +                                    ∑                              j                =                2                                            N                -                                  3                  ⁢                  n                                +                1                                      ⁢                          w              j              2                                                          (        6        )            
where each consecutive value of wj is not calculated by running through a total sum, but is recursively determined from the respectively previous value wjxe2x88x921. n is a value between 1 and the integer part of N/3.
In this way the present invention achieves a simpler and less time consuming calculation of the value R, such that the measurement method of the present invention enables a simpler and cheaper hardware, without any decrease in efficiency. More specifically, the calculation of the double sum of the above mentioned equation (3) requires floating point operations in a number depending on N2, whereas the method of the present invention only requires a number of floating point operations depending on N.
Therefore, the present invention decreases the required processing capacity and processing time, to thereby lead to better and/or cheaper hardware.
According to a preferred embodiment of the present invention, the calculation of w1 is done in accordance with             w      1        =                  ∑                  k          =          1                n            ⁢              (                              x                          k              +                              2                ⁢                n                                              -                      2            ⁢                          x                              k                +                n                                              +                      x            k                          )              ,
and the recursive calculation of wj in accordance with
wj=wjxe2x88x921+xjxe2x88x921+3nxe2x88x923xjxe2x88x921+2n+3xjxe2x88x921+nxe2x88x92xjxe2x88x921.
According to another preferred embodiment of the present invention, the calculation of w1 is performed by introducing a help variable y, where
yk32 xk+2nxe2x88x922xn+k+xkxe2x80x83xe2x80x83(8)
and                               w          1                =                              ∑                          k              =              1                        n                    ⁢                      y            k                                              (        9        )            
such that the recursive formula for wj becomes
wj=wjxe2x88x921+yjxe2x88x921+nxe2x88x92yjxe2x88x921xe2x80x83xe2x80x83(10)
According to further preferred embodiments, the values R, which depend on n, can be used to calculate a variance and a deviation value, either for individual values of n, or for all values of n from 1 to the integer part of N/3.
As another preferred embodiment of the present invention, the measurement method is applied to a communication system requiring synchronization, in which the deviation value that is calculated relates to the variation between a clock signal and a reference clock signal. According to another preferred embodiment, the present invention is applied to a system in which a surface profile level is compared to a reference profile level, and samples are measured at equal location intervals, such that the measured characteristic variation value relates to the spatial variation of the surface level.
As already mentioned above, the present invention can be applied to a system calculating a value characteristic of a variation on the basis of the above mentioned double sum shown in equation (3).